<template>
  <header class="music-header">
    <div class="header-container">
      <!-- Logo区域 -->
      <div class="logo-section">
        <div class="logo-icon">🎵</div>
        <h1 class="logo-text">网易云音乐</h1>
      </div>
      
      <!-- 主导航 -->
      <nav class="main-nav">
        <a href="#" class="nav-link active">发现音乐</a>
        <a href="#" class="nav-link">我的音乐</a>
        <a href="#" class="nav-link">关注</a>
        <a href="#" class="nav-link">商城</a>
        <a href="#" class="nav-link">音乐人</a>
        <a href="#" class="nav-link">云推歌</a>
        <a href="#" class="nav-link">下载客户端</a>
      </nav>
      
      <!-- 右侧功能区 -->
      <div class="header-right">
        <div class="search-box">
          <input type="text" placeholder="Q 音乐/视频/电台/用户" class="search-input">
          <button class="search-btn">🔍</button>
        </div>
        <a href="#" class="creator-center">创作者中心</a>
        <a href="#" class="login-btn">登录</a>
      </div>
    </div>
    
    <!-- 二级导航 -->
    <div class="secondary-nav">
      <a href="#" class="sec-nav-link active">推荐</a>
      <a href="#" class="sec-nav-link">排行榜</a>
      <a href="#" class="sec-nav-link">歌单</a>
      <a href="#" class="sec-nav-link">播客</a>
      <a href="#" class="sec-nav-link">歌手</a>
      <a href="#" class="sec-nav-link">新碟上架</a>
    </div>
  </header>
</template>

<script>
export default {
  name: 'MusicHeader'
}
</script>

<style scoped>
.music-header {
  background: #c20c0c;
  color: white;
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}

.logo-section {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-icon {
  font-size: 24px;
}

.logo-text {
  font-size: 20px;
  font-weight: bold;
  margin: 0;
}

.main-nav {
  display: flex;
  gap: 30px;
}

.nav-link {
  color: white;
  text-decoration: none;
  font-size: 14px;
  padding: 8px 12px;
  border-radius: 4px;
  transition: background-color 0.3s;
}

.nav-link:hover,
.nav-link.active {
  background: rgba(255, 255, 255, 0.2);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

.search-box {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 5px 15px;
}

.search-input {
  background: transparent;
  border: none;
  color: white;
  outline: none;
  width: 200px;
  font-size: 12px;
}

.search-input::placeholder {
  color: rgba(255, 255, 255, 0.7);
}

.search-btn {
  background: none;
  border: none;
  color: white;
  cursor: pointer;
  font-size: 14px;
}

.creator-center,
.login-btn {
  color: white;
  text-decoration: none;
  font-size: 12px;
  padding: 6px 12px;
  border-radius: 4px;
  transition: background-color 0.3s;
}

.creator-center:hover,
.login-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

.secondary-nav {
  background: #a40011;
  padding: 0 20px;
  display: flex;
  gap: 40px;
  height: 40px;
  align-items: center;
}

.sec-nav-link {
  color: white;
  text-decoration: none;
  font-size: 14px;
  padding: 8px 16px;
  border-radius: 4px;
  transition: background-color 0.3s;
}

.sec-nav-link:hover,
.sec-nav-link.active {
  background: #c20c0c;
}
</style>
